package com.example.placean.service.impl;

import com.example.food.domain.CoffeeTaste;

/**
 * 采用装饰者模式设计需求
 * 具体装饰角色
 * @author jiangshoutong
 */

public class TasteDecorator extends Decorator {

    private CoffeeTaste coffeeTaste;

    public TasteDecorator(Order order,CoffeeTaste coffeeTaste) {
        super(order,coffeeTaste);
    }

    public CoffeeTaste getCoffeeTaste() {
        return coffeeTaste;
    }


    public void setCoffeeTaste(CoffeeTaste coffeeTaste) {
        this.coffeeTaste = coffeeTaste;
    }

    @Override
    public String getDes() {
        return getOrder().getDes() + super.getDes();
    }

    @Override
    public float cost() {
        return getPrice() + getOrder().cost();
    }



}
